import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:lx_widgets_library/lx_widgets_library.dart';

import '../../../../l10n/local.dart';
import '../../others/custom_view/setting_items/settting_section.dart';
import 'controller.dart';

class VehicleMoreFeaturesView
    extends BaseGetView<VehicleMoreFeaturesController> {
  VehicleMoreFeaturesView({super.key});

  @override
  String get title => local.more_features;

  @override
  Widget buildBody(BuildContext context) {
    return Material(
      color: Colors.black,
      child: Obx(() {
        final itemList = controller.state.itemList;
        return ListView.builder(
          itemCount: itemList.length,
          itemBuilder: (context, sectionIndex) {
            final section = itemList[sectionIndex];
            return SettingSection(
              title: section.sectionType.name,
              children: section.subItems,
            );
          },
        );
      }),
    );
  }
}
